package b.r;

import android.graphics.Rect;
import android.os.Build.VERSION;
import android.util.Property;
import android.view.View;
import b.i.k.o;
import java.util.WeakHashMap;

/* compiled from: ViewUtils */
public class m {
    public static final s a;
    public static final Property<View, Float> b = new a(Float.class, "translationAlpha");

    /* compiled from: ViewUtils */
    public static class a extends Property<View, Float> {
        public a(Class cls, String str) {
            super(cls, str);
        }

        public Object get(Object obj) {
            return Float.valueOf(m.a((View) obj));
        }

        public void set(Object obj, Object obj2) {
            m.a.e((View) obj, ((Float) obj2).floatValue());
        }
    }

    /* compiled from: ViewUtils */
    public static class b extends Property<View, Rect> {
        public b(Class cls, String str) {
            super(cls, str);
        }

        public Object get(Object obj) {
            View view = (View) obj;
            WeakHashMap weakHashMap = o.a;
            return view.getClipBounds();
        }

        public void set(Object obj, Object obj2) {
            View view = (View) obj;
            Rect rect = (Rect) obj2;
            WeakHashMap weakHashMap = o.a;
            view.setClipBounds(rect);
        }
    }

    static {
        int i = VERSION.SDK_INT;
        if (i >= 29) {
            a = new r();
        } else if (i >= 23) {
            a = new q();
        } else if (i >= 22) {
            a = new p();
        } else {
            a = new o();
        }
        b bVar = new b(Rect.class, "clipBounds");
    }

    public static float a(View view) {
        return a.b(view);
    }

    public static void b(View view, int i, int i2, int i3, int i4) {
        a.d(view, i, i2, i3, i4);
    }
}
